How to configure the hover text?

fig <- plot_ly(type = 'scatter', mode = 'markers') 

fig <- fig %>%
  add_trace(
    x = c(1:5), 
    y = rnorm(5, mean = 5),
    text = c("Text A", "Text B", "Text C", "Text D", "Text E"),
   # hoverinfo = 'text',   # show text variable
   # hoverinfo = 'y',       # show variable (here value)
   hovertemplate = paste("<i><i>Price</i>: $%{y:.2f}","<br><b>X</b>: %{x}<br>"),   #show defined template
    marker = list(color='green'),
    showlegend = F
  )

fig

Doughnut Pie

library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
# Get Manufacturer
mtcars$manuf <- sapply(strsplit(rownames(mtcars), " "), "[[", 1)

df <- mtcars
df <- df %>% group_by(manuf)
df <- df %>% summarize(count = n())
fig <- df %>% plot_ly(labels = ~manuf, values = ~count)
fig <- fig %>% add_pie(hole = 0.6)
fig <- fig %>% layout(title = "Donut charts using Plotly",  showlegend = F,
                      xaxis = list(showgrid = FALSE, zeroline = FALSE, showticklabels = FALSE),
                      yaxis = list(showgrid = FALSE, zeroline = FALSE, showticklabels = FALSE))

fig

Sparkline

library(sparkline)
## Warning: package 'sparkline' was built under R version 3.6.3
set.seed(1234)
x = rnorm(10)
y = rnorm(10)

Inline line graphs

Bar charts negative values:

Stock Sparkline Boxplot
x
y